using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Text;

namespace System.Windows.Forms
{
    public class TypeHelper
    {
        static public Guid GetTypeGuid(Type t)
        {
            object[] colAttr = t.GetCustomAttributes(typeof(GuidAttribute), false);
            foreach (GuidAttribute attr in colAttr)
            {
                return new Guid(attr.Value);
            }
            return Guid.Empty;
        }
    }
}
